Optimal. Leaf size=151 \[ -\frac {(i a-b) (a-i b)^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {(a+i b)^{5/2} (i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {3609, 12,
3563, 3620, 3618, 65, 214} \begin {gather*} \frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\frac {(-b+i a) (a-i b)^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {(a+i b)^{5/2} (b+i a) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 65
Rule 214
Rule 3563
Rule 3609
Rule 3618
Rule 3620
Rubi steps
\begin {align*} \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx &=-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}+\int \left (-a^2-b^2\right ) (a+b \cot (c+d x))^{3/2} \, dx\\ &=-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}+\left (-a^2-b^2\right ) \int (a+b \cot (c+d x))^{3/2} \, dx\\ &=\frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}+\left (-a^2-b^2\right ) \int \frac {a^2-b^2+2 a b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx\\ &=\frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\frac {1}{2} \left ((a-i b)^2 \left (a^2+b^2\right )\right ) \int \frac {1+i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx-\frac {1}{2} \left ((a+i b)^2 \left (a^2+b^2\right )\right ) \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx\\ &=\frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\frac {\left ((a+i b)^3 (i a+b)\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \cot (c+d x)\right )}{2 d}-\frac {\left ((a+i b) (i a+b)^3\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \cot (c+d x)\right )}{2 d}\\ &=\frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\frac {\left ((a-i b)^3 (a+i b)\right ) \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \cot (c+d x)}\right )}{b d}-\frac {\left ((a-i b) (a+i b)^3\right ) \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \cot (c+d x)}\right )}{b d}\\ &=-\frac {(i a-b) (a-i b)^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {(a+i b)^{5/2} (i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.13, size = 253, normalized size = 1.68 \begin {gather*} \frac {(-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \left (\frac {5 i \left (a^2+b^2\right ) \left ((a-i b)^2 \sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )-\sqrt {a-i b} (a+i b)^2 \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )\right )}{\sqrt {a-i b} \sqrt {a+i b} (a+b \cot (c+d x))^{5/2}}+\frac {2 b \left (-4 a^2-6 b^2+2 a b \cot (c+d x)+b^2 \csc ^2(c+d x)\right )}{(a+b \cot (c+d x))^2}\right ) \sin (c+d x)}{5 d (-b \cos (c+d x)+a \sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(681\) vs.
\(2(127)=254\).
time = 0.61, size = 682, normalized size = 4.52
method | result | size |
derivativedivides | \(-\frac {2 b \left (\frac {\left (a +b \cot \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-a^{2} \sqrt {a +b \cot \left (d x +c \right )}-b^{2} \sqrt {a +b \cot \left (d x +c \right )}+\left (a^{2}+b^{2}\right ) \left (\frac {\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (b \cot \left (d x +c \right )+a +\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (2 \sqrt {a^{2}+b^{2}}\, b^{2}-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}+\frac {-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \cot \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-2 \sqrt {a^{2}+b^{2}}\, b^{2}+\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \cot \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}\right )\right )}{d}\) | \(682\) |
default | \(-\frac {2 b \left (\frac {\left (a +b \cot \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-a^{2} \sqrt {a +b \cot \left (d x +c \right )}-b^{2} \sqrt {a +b \cot \left (d x +c \right )}+\left (a^{2}+b^{2}\right ) \left (\frac {\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (b \cot \left (d x +c \right )+a +\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (2 \sqrt {a^{2}+b^{2}}\, b^{2}-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}+\frac {-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \cot \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-2 \sqrt {a^{2}+b^{2}}\, b^{2}+\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \cot \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}\right )\right )}{d}\) | \(682\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int a^{3} \sqrt {a + b \cot {\left (c + d x \right )}}\, dx - \int \left (- b^{3} \sqrt {a + b \cot {\left (c + d x \right )}} \cot ^{3}{\left (c + d x \right )}\right )\, dx - \int \left (- a b^{2} \sqrt {a + b \cot {\left (c + d x \right )}} \cot ^{2}{\left (c + d x \right )}\right )\, dx - \int a^{2} b \sqrt {a + b \cot {\left (c + d x \right )}} \cot {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 26.56, size = 2500, normalized size = 16.56 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________